package com.fineaiops.gateway.service.mapper;

import com.fineaiops.gateway.bean.ServiceNode;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;


public class ServiceNodeMapper implements RowMapper<ServiceNode> {
    @Override
    public ServiceNode mapRow(ResultSet rs, int rowNum) throws SQLException {
        return new ServiceNode(rs.getString("id"),
                rs.getString("name"),
                rs.getInt("is_breakdown"));
    }
}
